<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:o="http://openfaces.org/">

	<h:panelGroup rendered="#{rrr == '1'}">
		<h:panelGroup rendered="#{not empty viewParcelHelper.getPropertyRightsList(property)}">
			<rich:dataTable style="vertical-align:baseline;" value="#{viewParcelHelper.getPropertyRightsList(property)}" var="right" rowKeyVar="row" cellspacing="1" rows="13">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.party']}"/>
					</f:facet>
					<h:outputText value="#{viewParcelHelper.getOwner(right)}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rights.type']}"/>
					</f:facet>
					<h:outputText value="#{messages[viewParcelHelper.getTypeString(right)]}" />
				</rich:column>
				<rich:column style="text-align:right;">
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.share']}"/>
					</f:facet>
					<h:outputText value="#{viewParcelHelper.getShareString(right)}"/>
				</rich:column>
	
				<f:facet name="footer">
					<rich:columnGroup>
						<rich:column>#{messages['dataentry.mutate_rrr.total']}</rich:column>
						<rich:column colspan="3" style="text-align:right;">
							<h:outputText value="#{viewParcelHelper.getRightsSumShares(property)}"/>
						</rich:column>
					</rich:columnGroup>
				</f:facet>
			</rich:dataTable>
		</h:panelGroup>
		
		<h:panelGroup rendered="#{empty viewParcelHelper.getPropertyRightsList(property)}">
			<h:outputText value="#{messages['dataentry.mutate_rights.no']}" />
		</h:panelGroup>
	</h:panelGroup>

	<h:panelGroup rendered="#{rrr == '2'}">
		<h:panelGroup rendered="#{not empty viewParcelHelper.getPropertyRestrictionsList(property)}">
			<rich:dataTable style="vertical-align:baseline;" value="#{viewParcelHelper.getPropertyRestrictionsList(property)}" var="restriction" rowKeyVar="row" cellspacing="1" rows="13">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.party']}"/>
					</f:facet>
					<h:outputText value="#{viewParcelHelper.getOwner(restriction)}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_restrictions.type']}"/>
					</f:facet>
					<h:outputText value="#{messages[viewParcelHelper.getTypeString(restriction)]}" />
				</rich:column>
				<rich:column style="text-align:right;">
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.share']}"/>
					</f:facet>
					<h:outputText value="#{viewParcelHelper.getShareString(restriction)}"/>
				</rich:column>

				<f:facet name="footer">
					<rich:columnGroup>
						<rich:column>#{messages['dataentry.mutate_rrr.total']}</rich:column>
						<rich:column colspan="3" style="text-align:right;">
							<h:outputText value="#{viewParcelHelper.getRestrictionsSumShares(property)}"/>
						</rich:column>
					</rich:columnGroup>
				</f:facet>
			</rich:dataTable>
		</h:panelGroup>
		
		<h:panelGroup rendered="#{empty viewParcelHelper.getPropertyRestrictionsList(property)}">
			<h:outputText value="#{messages['dataentry.mutate_restrictions.no']}" />
		</h:panelGroup>
	</h:panelGroup>
	
	<h:panelGroup rendered="#{rrr == '3'}">
		<h:panelGroup rendered="#{not empty viewParcelHelper.getPropertyResponsibilitiesList(property)}">
			<rich:dataTable style="vertical-align:baseline;" value="#{viewParcelHelper.getPropertyResponsibilitiesList(property)}" var="responsibility" rowKeyVar="row" cellspacing="1" rows="13">
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.party']}"/>
					</f:facet>
					<h:outputText value="#{viewParcelHelper.getOwner(responsibility)}"/>
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_responsibilities.type']}"/>
					</f:facet>
					<h:outputText value="#{messages[viewParcelHelper.getTypeString(responsibility)]}" />
				</rich:column>
				<rich:column style="text-align:right;">
					<f:facet name="header">
						<h:outputText value="#{messages['dataentry.mutate_rrr.share']}"/>
					</f:facet>
					<h:outputText value="#{viewParcelHelper.getShareString(responsibility)}"/>
				</rich:column>

				<f:facet name="footer">
					<rich:columnGroup>
						<rich:column>#{messages['dataentry.mutate_rrr.total']}</rich:column>
						<rich:column colspan="3" style="text-align:right;">
							<h:outputText value="#{viewParcelHelper.getResponsibilitiesSumShares(property)}"/>
						</rich:column>
					</rich:columnGroup>
				</f:facet>
			</rich:dataTable>
		</h:panelGroup>
		
		<h:panelGroup rendered="#{empty viewParcelHelper.getPropertyResponsibilitiesList(property)}">
			<h:outputText value="#{messages['dataentry.mutate_responsibilities.no']}" />
		</h:panelGroup>
	</h:panelGroup>

</ui:composition>
